/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ufps.cuatro.util.generadores.codeobject;

import java.util.ArrayList;

/**
 *
 * @author CATC
 */
public class CodeContextPackage extends CodeContext{
    
    public final static String PACKAGE = "package";
    private String strPackage = "";

    public CodeContextPackage() {
    }    

    public CodeContextPackage(String strPackage) {
        this.strPackage = strPackage.trim();
    }

    public String getStrPackage() {
        return strPackage;
    }

    public void setStrPackage(String strPackage) {
        this.strPackage = strPackage.trim();
    }

    @Override
    public String toString() {        
        return strPackage;
    }
    
    public ArrayList<String> getTokens(){
        return UtilCodeContext.getTokens(strPackage, ".");
    }

    
    public String getDefinicion(Object obj) {
        if(!strPackage.isEmpty()){
            return PACKAGE + " " + strPackage;
        }
        return "";
    }
}
